package com.liuz.wechat.server.impl;

import com.liuz.wechat.bean.JieXiData;
import com.liuz.wechat.bean.JieXiResult;
import com.liuz.wechat.bean.JieXiType;
import com.liuz.wechat.dao.JiexiForSql;
import com.liuz.wechat.server.ShiPinJieXi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class ShiPinJieXiImpl implements ShiPinJieXi {
    @Autowired
    private JiexiForSql jiexiforsql;
    @Override
    public JieXiResult freeJiexi(String url) {
        log.info("当前url:"+url);
        JieXiType resultType=jiexiforsql.findJieXiType();
        log.info("resultType:"+resultType);
        String JieXi_Type=resultType.getType();
        log.info("type:"+resultType.getType());


        JieXiData data=new JieXiData();
        data.setCode("000000");
        data.setMsg("解析成功");
        data.setOldurl(url);
        data.setTitle("测试标题");
        data.setVideourl("新的url");
        JieXiResult resl=new JieXiResult();
        resl.setCode("000000");
        resl.setMsg("解析成功");
        resl.setData(data);
        return  resl;

    }
}
